<?php

class dbacountries {
 
  function dbacountries (&$dba){
    $this->dba = &$dba;
  }

  function add ($cid,$home){
    if (!$home) $home = 'N';
    return $this->dba->query("insert into ".$this->dba->tableforwarder."_shopCountries (c_id,home) values ('$cid','$home');");
  }
  
  function del ($cid){
    return $this->dba->query("delete from ".$this->dba->tableforwarder."_shopCountries where c_id='$cid';");
  }
  
 function getall (){
   $this->dba->query("select country,c_id,home from ".$this->dba->tableforwarder."_shopCountries,".$this->dba->tableforwarder."_shopCurrDesc where id = c_id order by country;");
   return $this->dba->fetch_rows_array();
 }

 function getlist (){
   $this->dba->query("select * from ".$this->dba->tableforwarder."_shopCurrDesc order by short;");
   return $this->dba->fetch_rows_array();
 }

}

?>
